<h1>Naši proizvodi</h1>
<div class="elementFilter">
    <form action="<?php echo url_for('proizvod/index')?>" method="post">
<?php echo $filter?>
        <input type="submit" value="Pošalji">
</form>
					</div>

<table id="rounded-corner">
  <thead>
    <tr>
        <th class="rounded-company">Slika</th>
      <th>Naziv</th>
      <th>Opis</th>
      <th>Cena</th>
      <th>Porez</th>
      <th>Kolicina</th>
      <th class="rounded-qend">Kategorija</th>
      

    </tr>
  </thead>
 
  <tfoot>
    	<tr>
        	<td colspan="" class="rounded-foot-left">&nbsp;</td>
                <td colspan="5" ><em><?php if ($pager->haveToPaginate()): ?>
  <?php echo link_to('&laquo;', 'proizvod/index?page='.$pager->getFirstPage()) ?>
  <?php echo link_to('&lt;', 'proizvod/index?page='.$pager->getPreviousPage()) ?>
  <?php $links = $pager->getLinks(); foreach ($links as $page): ?>
    <?php echo ($page == $pager->getPage()) ? $page : link_to($page, 'proizvod/index?page='.$page) ?>
    <?php if ($page != $pager->getCurrentMaxLink()): ?> - <?php endif ?>
  <?php endforeach ?>
  <?php echo link_to('&gt;', 'proizvod/index?page='.$pager->getNextPage()) ?>
  <?php echo link_to('&raquo;', 'proizvod/index?page='.$pager->getLastPage()) ?>
<?php endif ?>
</em></td>
                    
        	<td class="rounded-foot-right"> &nbsp</td>
        </tr>
    </tfoot>
  <tbody>
    <?php foreach ($proizvod_list as $proizvod): ?>
    <tr>
        <td>
        <a href="proizvod/details?id=<?php echo $proizvod->getId()?>">
        <?php if (file_exists(sfConfig::get('sf_web_dir') . '/uploads/images/proizvod/proizvod_' . $proizvod->getId() . '.jpg')){ ?>
	<?php echo image_tag('/uploads/images/proizvod/proizvod_' . $proizvod->getId() . '.jpg', 'border="0" alt="" style="max-width: 150px; max-height=150px; border: 1px solid #999;"'); ?>
        <?php }else{ ?>
	&nbsp;
        <?php } ?>
        </a>
        </td>
      <td><a href="proizvod/details?id=<?php echo $proizvod->getId()?>"><?php echo $proizvod->getNaziv() ?></td>
      <td><?php echo substr($proizvod->getOpis(),0,50 )."..." ?></td>
      <td><?php echo $proizvod->getNabavnaCena() ?></td>
      <td><?php echo $proizvod->getPorez() ?></td>
      <td><?php echo $proizvod->getDostupnaKolicina() ?></td>
      <td><?php echo $proizvod->getKategorija()->getNaziv() ?></td>
      </tr>
    <?php endforeach; ?>
  </tbody>
</table>



